﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Jui.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    瀚华小额贷款管理系统 - 订单管理
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <%//Html.RenderPartial("~/Views/Shared/Menu.ascx", 1); %>
    <div id="layout" class="noNavTab">
        <div id="navTab" class="tabsPage page">
            <h2 class="contentTitle">
                订单列表</h2>
            <div class="pageHeader">
                <%Html.RenderPartial("~/Views/Order/Shared/conditions.ascx", "Corporation");  %>
                <!--conditions-->
            </div>
            <div class="pageContent">
                <%
                    string menu = "Order_Main";
                    string url = string.Format("/Order/List");
                    string tname = "Order_Detail_Personal";
                    string ename = DencryptHelper.Encrypt(tname);
                %>
                 <div class="panelBar">
                    <ul class="toolBar">
                        <li style="height:25px;" >
                        <input type="button" id="btnExport" name="btnExport" value="导出数据" onclick="Export()" />
                        </li>
                        <li class="line">line</li>
                        
                    </ul>
                </div>
                <!--加载列表-->
                <div id="listDt">
                </div>
                <div style="height: 8px; clear: both;">
                </div>
                <div id="detailContent" class="con_r">
                </div>
            </div>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
    <script language="javascript" type="text/javascript">
        $(function () {
            //$("#nlt2").hide();
            loadList();
            //loadList("Corporation");
        });

        function loadList() {
            var typ = $("#ddlType").val();
            var route = "Corporation";
            if (typ == 3) {
                route = "Personal";
            }
            var htmlname = "listDt";
            $("#" + htmlname).load(
            "/Order/GetList" + route,
            {
                typ: $("#ddlType").val(),
                orderId: $("#txtOrderId").val(),
                handlerId: $("#ddlHandler").val(),
                status: $("#ddlStatus").val(),
                dateFrom: $("#txtDateFrom").val(),
                dateTo: $("#txtDateTo").val(),
                pageindex: pIndex,
                pagesize: pSize
            },
            function () {
                $("table.table", $("#" + htmlname)).jTable();
            });
            $("#detailContent").empty();
        }

        function Export() {            
            var typ = $("#ddlType").val();
            var url = '/Order/Export_' + typ + '?orderId=' + $("#txtOrderId").val() 
                    + '&handlerId=' + $("#ddlHandler").val() 
                    + '&status=' + $("#ddlStatus").val() 
                    + '&dateFrom=' + $("#txtDateFrom").val()
                    + '&dateTo=' + $("#txtDateTo").val()
                    + '&typ=' + $("#ddlType").val();
            window.location.href = url;
        }

    </script>
    <script type="text/javascript" src="/Scripts/jquery.autocomplete.min.js"></script>
    <script type="text/javascript" src="/Scripts/pager.js"></script>
    <!--选择卡效果-->
    <script type="text/javascript" language="javascript">
        function tabShow(o) {
            if (o == "P") {//alert(1);
                $("#nlt1").style.display = "block";
                $("#nlt2").style.display = "none";
            }
            if (o == "C") {
                //alert(2);
                $("#nlt2").style.display = "block";
                $("#nlt1").style.display = "none";
            }
        }
        function tabDiv(obj, num, len, cn, out) {
            var overname = cn;
            for (var id = 1; id <= len; id++) {
                var ss = obj + id;
                var snav = obj + "nav" + id;
                if (id == num) {
                    try { document.getElementById(ss).style.display = "block" } catch (e) { };
                    try { document.getElementById(snav).className = overname } catch (e) { };
                } else {
                    try { document.getElementById(ss).style.display = "none" } catch (e) { };
                    try { document.getElementById(snav).className = out } catch (e) { };
                }
            }
        }
    </script>    
    <link href="/content/jui-normal.css" rel="stylesheet" type="text/css" />
</asp:Content>
